EMT Practice Test

1. Question Content...


Question List

Question1: What is a capability of cross-object formula fields? Choose 3 answers

Question2: On which object can an administrator create a roll-up summary field?

Question3: Refer to the following code that runs in an Execute Anonymous block:

In an environment where the full result set is returned, what is a possible outcome of this code?

Question4: Universal Containers (UC) has an integration with its Accounting system that creates tens of thousands of Orders inside of Salesforce in a nightly batch. UC wants to add automaton that can attempt to match Leads and Contacts to these Orders using the Email Address field on the insert. UC is concerned about the performance of the automation with a large data volume. Which tool should UC use to automate this process?

Question5: A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case.Status field are on a custom Visualforce page. Which action can the developer perform to get the record types and picklist values in the controller? (Choose 2)

Question6: Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers

Question7: Which two statement can a developer use to throw a custom exception of type MissingFieldValueException?Choose 2 answers

Question8: A developer has the following class and trigger code public class insurancerates{ public static final decimal smokercharge = 0.01; } trigger contacttrigger on contact (before insert){ insurancerates rates = new insurancerates(); decimal basecost=xxx; } Which code segment should a developer insert at the xxx to set the basecost variable to the value of the class variable smokercharge?

Question9: When would a developer use a custom controller instead of a controller extension? Choose 2 answers:

Question10: Which one do you like?
What should a developer consider for an environment that has over 10,000 Case records?

Question11: Which two operations can be performed using a formula field? Choose 2 answers

Question12: Which exception type cannot be caught?

Question13: Given the following code snippet, that is part of a custom controller for a Visualforce page:

In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the DML statement from being executed if the current logged-in user does not have the appropriate level of access? Choose 2 answers

Question14: Universal Containers decides to use purely declarative development to build out a new Salesforce application.
Which three options can be used to build out the business logic layer for this application?
Choose 3 answers

Question15: In which order does Salesforce execute events upon saving a record?

Question16: What must the Controller for a Visulforce page utilized to override the standard Opportunity view button?

Question17: A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous tool in the Developer Console. The code then executes with no exceptions or errors. Why did the test method fail in the sandbox and pass in the Developer Console?

Question18: When a Task is created for a Contact, how can a developer prevent the task from being included on the Activity Timeline of the Contact's Account record?

Question19: What is the requirement for a class to be used as a custom Visualforce controller?

Question20: On a Visualforce page with a custom controller, how should a developer retrieve a record by using an ID that is passed on the URL?

Question21: For which three items can a trace flag be configured?
Choose 3 answers

Question22: Which governor limit applies to all the code in an apex transaction?

Question23: Refer to the following code snippet for an environment has more than 200 Accounts belonging to the Technology' industry:

When the code execution, which two events occur as a result of the Apex transaction?
When the code executes, which two events occur as a result of the Apex transaction?
Choose 2 answers

Question24: What are two ways for a developer to execute tests in an org?

Question25: What are two considerations for custom Apex Exception classes? Choose 2 answers.

Question26: Which salesforce org has a complete duplicate copy of the production org including data and configuration?

Question27: A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to Include helper methods that are not used by the Web Application In the Implementation of the Web Service Class.
Which code segment shows the correct declaration of the class and methods?
A)

B)

C)

D)

Question28: A developer needs to find information about @future methods that were invoked. From which system monitoring feature can the developer see this information?

Question29: What is the maximum number of SOQL queries used by the following code? List<Account> aList = [SELECT Id FROM Account LIMIT 5]; for (Account a : aList){ List<Contact> cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id); }

Question30: Universal Containers stores the availability date on each Line Item of an Order and Orders are only shipped when all of the Line Items are available. Which method should be used to calculate the estimated ship date for an Order?

Question31: A developer needs to display all of the available fields for an object.
In which two ways can the developer retrieve the available fields if the variable myObject represents the name of the object? (Choose two.)

Question32: While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a standard PriceBook since one already exists in the org.
How should the Developer overcome this problem?

Question33: A developer needs to save a List of existing Account records named myAccounts to the database, but the records do not contain Salesforce Id values. Only the value of a custom text field configured as an External ID with an API name of Foreign_Key__c is known.
Which two statements enable the developer to save the records to the database without an Id? (Choose two.)

Question34: Which two approaches optimize test maintenance and support future declarative configuration changes? Choose 2 answers.

Question35: A Lightning component has a wired property, searcResults, that stores a list of Opportunities. Which definition of the Apex method, to which the searchResults property is wired, should be used?

Question36: A developer has requirement to write Apex code to update a large number of account records on a nightly basis. The system administrator needs to be able to schedule the class to run after business hours on an as-needed basis.
Which class definition should be used to successfully implement this requirement?

Question37: Which user can edit a record after it has been locked for approval? (Choose 2)

Question38: An sObject named Application_c has a lookup relationship to another sObject named Position_c. Both Application _c and Position_c have a picklist field named Status_c.When the Status_c field on Position_c is updated, the Status_c field on Application_c needs to be populated automatically with the same value, and execute a workflow rule on Application_c.How can a developer accomplish this?

Question39: Universal Containers requires Service Representatives to update all Cases at least one every three days. To make sure of this policy is obeyed, a developer has been asked to implement a field that displays the number of days since the last Case update. What should the developer use to configure the solution?

Question40: Which three options allow a developer to use custom styling in a Visualforce page? (Choose three.)

Question41: Refer to the following Apex code:

What is the value of x when it is written to the debug log?

Question42: What does the Lightning Component framework provide to developers?

Question43: An org has different Apex Classes that provide Account -related functionality.After a new validation rule is added to the object, many of the test methods fail.What can be done to resolve the failures and reduce the number of code changes needed for future validation rules?Choose 2 answers:

Question44: Which action can a developer perform in a before update trigger? (Choose 2)

Question45: What is an accurate statement about variable scope? (Choose 3)

Question46: A developer receives an error when trying to call a global server-side method using the remoteAction decorator.
How can the developer resolve the error?

Question47: A developer has a block of code that omits any statements that indicate whether the code block should execute with or without sharing. What will automatically obey the organization-wide defaults and sharing settings for the user who executes the code in the Salesforce organization?

Question48: A developer considers the following snippet of code: Boolean isOK; integer x; String theString = 'Hello'; if (isOK == false && theString == 'Hello') { x = 1; } else if (isOK == true && theString =='Hello') { x = 2; } else if (isOK != null && theString == 'Hello') { x = 3; } else { x = 4; } Based on this code, what is the value of x?

Question49: A developer wants to create a custom object to track Customer Invoices.How should Invoices and Accounts be related to ensure that all Invoices are visible to everyone with access to an Account?

Question50: What are two benefits of using declarative customizations over code? Choose 2 answers What are two benefits of using declarative customizations over code?

Question51: A developer has to Identify a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a DML statement to save the changes to the database. Which two techniques should the developer implement as a best practice to esure transaction control and avoid exceeding governor limits? Choose 2 answers

Question52: How can a developer implement this feature?

Question53: A visualforce interface is created for Case Management that includes both standard and custom functionality defined in an Apex class called myControllerExtension. The visualforce page should include which <apex:page> attribute(s) to correctly implement controller functionality?

Question54: What is a correct pattern to follow when programming in Apex on a Multi-tenant platform?

Question55: A Visualforce page is required for displaying and editing Case records that includes both standard and custom functionality defined in an Apex class called myControllerExtension.
The Visualforce page should include which <apex:page> attribute(s) to correctly implement controller functionality?

Question56: A developer needs to avoid potential system problems that can arise in a multi-tenant architecture. Which requirement helps prevent poorty written applications from being deployed to a production environment?

Question57: What is a capability of the Force.com IDE? Choose 2 answers

Question58: A developer has two custom controller extensions where each has a save() method.
Which save() method will be called for the following Visualforce page?
<apex:page standardController ="Account", extensions="ExtensionA, ExtensionB">
<apex:commandButton action ="{!save}" value="Save"/>
</apex:page>

Question59: What is a benefit of using an after insert trigger over using a before insert trigger?

Question60: What is a valid statement about Apex classes and interfaces? Choose 2 answers:

Question61: A developer needs to create an audit trail for records that are sent to the recycle bin. Which type of trigger is most appropriate to create?

Question62: Which data type or collection of data types can SOQL statements populate or evaluate to? (Choose 3)

Question63: Which two statement are acceptable for a developer to use Inside procedural loops?

Question64: A team of many developers work in their own individual orgs that have the same configuration at the production org. Which type of org is best suited for this scenario?

Question65: A developer needs to have records with specific field values in order to test a new Apex class. What should the developer do to ensure the data is available to the test?

Question66: What is the value of the Trigger.old context variable in a Before Insert trigger?

Question67: Which tag should a developer include when styling from external CSS is required in a Visualforce page?

Question68: In the following example, which sharing context will myMethod execute when it is invoked?

Question69: A developer Edition org has five existing accounts. A developer wants to add 10 more accounts for ...
The following code is executed in the Developer Console using the Executor Anonymous window:

How many total accounts will be in the org after this code is executed?

Question70: Which three methods help ensure quality data?

Question71: A company wants to create an employee rating program that allows employees to rate each other. An employee's average rating must be displayed on the employee record. Employees must be able to create rating records, but are not allowed to create employee records. Which two actions should a developer take to accomplish this task? choose 2 answers

Question72: Which annotation exposes an Apex class as a RESTful web service?

Question73: How can a developer check the test coverage of active Process Builder and Flows deploying them in a Changing Set?

Question74: A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank.
Which automation allows the developer to satisfy this requirement in the most efficient manner?

Question75: Which three statements are accurate about debug logs? Choose 3 answers

Question76: A developer creates a custom exception as shown below:
What are two ways the developer can fire the exception in Apex? Choose 2 answers

Question77: Which component is available to deploy using Metadata API? Choose 2 answers

Question78: What are three characteristics of static methods? (Choose three.)

Question79: A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.
In this implementation scenario, which artifact is part of the Controller according to the MVC architecture?

Question80: Which two strategies should a developer use to avoid hitting governor limits when developing in a multi-tenant environment? (Choose two.)

Question81: A developer has the following code:try {List nameList;Account a;String s = a.Name;nameList.add(s);} catch (ListException le ) {System.debug(' List Exception ');} catch (NullPointerException npe) {System.debug(' NullPointer Exception ');} catch (Exception e) {System.debug(' Generic Exception ');} What message will be logged?

Question82: A platform developer at Universal Containers needs to create a custom button for the Account object that, when clicked, will perform a series of calculations and redirect the user to a custom Visualforce page.
Which three attributes need to be defined with values in the <apex:page> tag to accomplish this? (Choose three.)

Question83: Which two statements are accurate regarding Apex classes and interfaces?
Choose 2 answers

Question84: A developer is asked to create a custom visualforce page that will be used as a dashboard component. Which three are valid controller options for this page? Choose 3 answers

Question85: Which two conditions cause workflow rules to fire? Choose 2 answers

Question86: An org has an existing Flow that creates an Opportunity with an Update Records element. A developer update the Flow to also create a Contact and store the created Contact's ID on the Opportunity.
Which update should the developer make in the Flow?

Question87: When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers

Question88: A visualforce page uses the contact standard controller. How can a developer display the name from the parent account record on the page?

Question89: Which two ways can a developer instantiate a PageReference in Apex? Choose 2 answers

Question90: What is an accurate constructor for a custom controller named "MyController"?

Question91: What are three ways for a developer to execute tests in an org? Choose 3.

Question92: In order to override a standard action with a visualforce page, which attribute must be defined in the <apex:page> tag?

Question93: When an Account's custom picklist field called Customer Sentiment is changed to a value of "Confused", a new related Case should automatically be created.
Which two methods should a developer use to create this case? (Choose two.)

Question94: The Job_Application__c custom object has a field that is a Master-Detail relationship to the Contact object, where the Contact object is the Master. As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is 'Technology' while also retrieving the contact's Job_Application__c records.
Based on the object's relationships, what is the most efficient statement to retrieve the list of contacts?

Question95: A sales manager wants to make sure that whenever an opportunity stage is changed to 'Closed Won', a new case will be of created for the support team to collect necessary information from the customer. How should a developer accomplish this?

Question96: The Salesforce Administrator created a custom picklist field, Account_status_c, on the a Account object. This picklist has possible values of Inactive'' and Active?
As part of a new business process, management wants to ensure an opportunity record is created only for Accounts marked as "Active". A developer is asked to implement this business requirement.
Which two automation tools should be used to fulfill the business need?
Choose 2 answers

Question97: A developer needs to create a Visualforce page that displays Case dat
a. The page will be used by both support reps and support managers. The Support Rep profile does not allow visibility of the Customer_Satisfaction__c field, but the Support Manager profile does.
How can the developer create the page to enforce Field Level Security and keep future maintenance to a minimum?

Question98: A developer has the following code block:
public class PaymentTax {public static decimal SalesTax = 0.0875;} trigger OpportunityLineItemTrigger on OpportunityLineItem (before insert, before update) {PaymentTax PayTax = new PaymentTax();decimal ProductTax = ProductCost * XXXXXXXXXXX;} To calculate the productTax, which code segment would a developer insert at the XXXXXXXXXXX to make the value the class variable SalesTax accessible within the trigger?

Question99: A developer is creating a Visualforce page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default Opportunity record type, and set certain default values based on the record type before inserting the record. How can the developer find the current user's default record type?

Question100: A developer wants to invoke on outbound message when a record meets a specific criteria.
Which three features satisfy this use case?
Choose 3 answer

Question101: The values 'High', 'Medium', and 'Low' are Identified as common values for multiple picklist across different object. What is an approach a developer can take to streamline maintenance of the picklist and their values, while also restricting the values to the ones mentioned above?

Question102: Which type of information is provided by the Checkpoints tab in the Developer Console? (Choose 2)

Question103: Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records. which Visualforce feature supports this requirement?